/*
 * Copyright (c) 2024 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef ARK_WEB_CONTEXT_MENU_PARAMS_H_
#define ARK_WEB_CONTEXT_MENU_PARAMS_H_
#pragma once

#include "base/include/ark_web_base_ref_counted.h"
#include "base/include/ark_web_types.h"

namespace OHOS::ArkWeb {

/*--ark web(source=webcore)--*/
class ArkWebContextMenuParams : public virtual ArkWebBaseRefCounted {
public:
    /*--ark web()--*/
    virtual int32_t GetXCoord() = 0;

    /*--ark web()--*/
    virtual int32_t GetYCoord() = 0;

    /*--ark web()--*/
    virtual bool IsEditable() = 0;

    /*--ark web()--*/
    virtual ArkWebString GetLinkUrl() = 0;

    /*--ark web()--*/
    virtual ArkWebString GetPageUrl() = 0;

    /*--ark web()--*/
    virtual ArkWebString GetSourceUrl() = 0;

    /*--ark web()--*/
    virtual ArkWebString GetTitleText() = 0;

    /*--ark web()--*/
    virtual ArkWebString GetSelectionText() = 0;

    /*--ark web()--*/
    virtual int GetMediaType() = 0;

    /*--ark web()--*/
    virtual int GetSourceType() = 0;

    /*--ark web()--*/
    virtual int GetInputFieldType() = 0;

    /*--ark web()--*/
    virtual bool HasImageContents() = 0;

    /*--ark web()--*/
    virtual int32_t GetEditStateFlags() = 0;

    /*--ark web()--*/
    virtual ArkWebString GetUnfilteredLinkUrl() = 0;

    /*--ark web()--*/
    virtual int32_t GetContextMenuTypeFlags() = 0;

    /**
     * @Description: Obtains the position rectangle of the image.
     * @Output x: X-coordinate of the image rectangle.
     * @Output y: Y-coordinate of the image rectangle.
     * @Output w: Width of the image rectangle.
     * @Output h: Height of the image rectangle.
     */
    /*--ark web()--*/
    virtual void GetImageRect(int& x, int& y, int& w, int& h) = 0;

    /**
     * @Description: Indicates whether the link tag is generated by AI.
     * @Return: Returns whether the link tag generated by AI, true link tag generated by AI, false link tag from html.
     * @Since: 12005
     */
    /*--ark web()--*/
    virtual bool IsAILink() = 0;

    /*--ark web()--*/
    virtual int GetContextMenuMediaType() = 0;
};

} // namespace OHOS::ArkWeb

#endif // ARK_WEB_CONTEXT_MENU_PARAMS_H_
